<!DOCTYPE html>

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>我爱的古诗词</title>
    <style type="text/css">
         body{
            border-style: double;
            border-color: mediumorchid;
            position: absolute;
            border-radius: 20px 15px 8px 8px;
        }

    </style>

    <script src="/2031echarts/js/vue.js"></script>
</head>

<body>
    <div id="app">
        <!-- v-html富文本的格式 -->
        <div class="content" v-html="msg1"></div>
        <input type="text" value="陈大利" v-on:input="input1">
        <button @click="click">{{message}}</button>
        <div v-show="isShow">
            床前明月光，<br>
            疑是地上霜。<br>
            举头望明月，<br>
            低头思故乡。<br>
        </div>
    </div>
    <script>
        var vm = new Vue({
            el: '#app',
            data: {
                msg1:'<center><h3>我爱的故事</h3></center>',
                input1:'陈大利',
                isShow:false,
                message:'展开'

            },
            methods: {
                click(){
              this.isShow = !this.isShow;
              if(this.isShow){
                  this.message='收起';
                 }else{
                  this.message='展开';
                 }
               }
            }
        })
    </script>
</body>

</html>